#include "channelCountMessageHandler.h"
#include "channelCountMessage.h"
#include "channelCountResMessage.h"
#include "config.h"

void ChannelCountMessageHandler::handle(MtpMessage* message, const IPaddress& attachment)
{
    ChannelCountResMessage msg(Config::inst().getChannelCount(), message);
    msg.send(attachment);
}

MtpMessage* ChannelCountMessageHandler::decode(MtpProtocol* packet, const IPaddress& attachment)
{
    return new ChannelCountMessage(packet);
}
